<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #liu{
            color: red;
        }
        .zz{
            color: green;
        }
        input[type='text'],body>p{
            background-color: yellow;
        }
        body>div>div>p{
            color: pink;
        }
        div div p{
            background-color: blue;
        }
        a:link{/*未访问*/
            color: green;
        }
        a:visited{/*访问过*/
            color: red;
        }
        a:hover{/*悬停*/
            color: yellow;
        }
        a:active{/*点击*/
            color: purple;
        }
    </style>
</head>
<body>
<ul>
    <li id="liu">刘备</li>
    <li>关羽</li>
    <li class="zz">张飞</li>
</ul>
<p>香蕉</p>
<p class="zz">苹果</p>
<input type="text">
<input type="password">
<div>
    <p>p1</p>
    <div>
        <p>p2</p>
    </div>
    <div>
        <div><p>p3</p></div>
    </div>
</div>
<a href="http://www.qq.com">腾讯</a>
</body>
</html>